<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
	<head th:replace="common/index :: head"></head>
	<body class="mainbody">
		<div th:replace="common/index :: location('角色管理')"></div>
		<div th:replace="common/index :: toolbar"></div>
		<form id="searchForm" method="GET" style="display:none;" th:object="${search}">
			<div class="det-list clearfix">
			    <div class="group btm">
					<div class="control">
			            <div class="title">角色名称</div>
			            <input class="input normal" type="text" th:field="*{name}"/>
			        </div>
			    </div>
			    <div class="group searchbtn">
			        <div class="btn-list">
			            <input type="submit" value="查询" class="btn" />
			            <input type="reset" value="重置" class="btn yellow" />
			        </div>
			    </div>
			    <div style="clear:both;"></div>
			</div>
		</form>
		
		<table id="list">
			<thead>
				<tr><th bgcolor="#7b88b7" width="355">角色名称</th><th bgcolor="#7b88b7" width="355">角色英文名称</th><th bgcolor="#7b88b7" width="380">操作</th></tr>
			</thead>
			<tbody>
				<tr th:each="obj : ${list}" th:object="${obj}">
					<td th:text="*{name}"></td>
					<td th:text="*{ename}"></td>
					<td th:replace="common/index :: operation"></td>
				</tr>
			</tbody>
		</table>
		<script>
		$("#list").flexigrid({
			height:window.innerHeight-200
		});
		$("input[type=submit]").click(function(){
			$("input[name=page]").val(1);
		});
		function deleteObj(id){
			if(confirm("确认删除?")) location.href=id+"/delete";
		}
		</script>
	</body>
</html>